Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENG-97 Try/Catch around more of the onYouTubeIframeAPIReady code to retry #1370

Merged
merged 3 commits into from
Sep 14, 2023

Conversation

bryanlandia
Copy link

Change description

Still getting onYouTubeIframeAPIReady TypeErrors once in a while when loading YouTube videos in courseware.

When I reproduced it, I didn't see any of the JS console messages that I put in, like

console.error('Error while trying to resolve the Deferred object responsible for calling OnYouTubeIframeAPIReady callbacks.');
console.error('window.onYouTubeIframeAPIReady is ' + window.onYouTubeIframeAPIReady);

so the try/catch I put in to retry the function wasn’t getting executed at least in this case.

This PR:

  • catches a TypeError in more of the function code
  • allows up to 5 retries (was 3)
  • waits 500ms before a retry

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Related issues

https://appsembler.atlassian.net/browse/ENG-97

Checklists

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

@bryanlandia bryanlandia changed the title Bugfix/eng 97 catch and retry yt api errs ENG-97 Try/Catch around more of the onYouTubeIframeAPIReady code to retry Sep 13, 2023
@github-actions
Copy link

Checking git merge conflicts against https://github.com/edx/edx-platform.git

Comparing with open-release/nutmeg.master
Benchmark conflicts with main 299
Current conflicts 299
Summary Good work! No added conflicts.
Comparing with master
Benchmark conflicts with main 317
Current conflicts 317
Summary Good work! No added conflicts.

@bryanlandia bryanlandia marked this pull request as ready for review September 13, 2023 23:31
@bryanlandia bryanlandia merged commit 6e7a3ef into main Sep 14, 2023
11 checks passed
@bryanlandia bryanlandia deleted the bugfix/ENG-97-catch-and-retry-yt-api-errs branch September 14, 2023 17:11
bryanlandia added a commit that referenced this pull request Sep 15, 2023
…y-yt-api-errs

ENG-97 Try/Catch around more of the onYouTubeIframeAPIReady code to retry

## Change description

> Description here

## Type of change
- [ ] Bug fix (fixes an issue)
- [ ] New feature (adds functionality)

## Related issues

> Fix [#1]()

## Checklists

### Development

- [ ] Lint rules pass locally
- [ ] Application changes have been tested thoroughly
- [ ] Automated tests covering modified code pass

### Security

- [ ] Security impact of change has been considered
- [ ] Code follows company security practices and guidelines

### Code review

- [ ] Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
- [ ] "Ready for review" label attached and reviewers assigned
- [ ] Changes have been reviewed by at least one other contributor
- [ ] Pull request linked to task tracker where applicable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants